package com.syx.rabbitmq.logisticsservice.listener;

import com.syx.rabbitmq.logisticsservice.Constant.Constant;
import com.syx.rabbitmq.orderserver.Model.OrderInfo;
import org.springframework.amqp.core.Message;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestMapping;

@Component
@RabbitListener(queues = Constant.ORDER_QUEUE)
public class OrderListener {

    @RabbitHandler
    public void handMessage(Message message,String orderInfo){
        System.out.println("接收到订单消息1String"+orderInfo);

    }


    @RabbitHandler
    public void handMessage(Integer orderInfo){
        System.out.println("接收到订单消息2"+orderInfo);

    }


    @RabbitHandler
    public void handMessage(OrderInfo orderInfo){
        System.out.println("接收到订单消息2OrderInfo"+orderInfo);

    }








}
